<?php
/**
 * @author qingyu8@staff.weibo.com
 * @date 2018/04/19
 * @var $item
 * @var $type
 * @var $this yii\web\View */

use yii\helpers\Url;

$postUrl = Url::to([
    'save',
    'type' => $type
]);
$this->registerJs('
$("#submit").click(function(){
$.post("' . $postUrl . '",$("#form").serialize(),function(res){console.log(res);if(res.err==0){history.back();}},"json");
});
');
?>
<?php if ($type == 'boat') { ?>
	<form class="form-horizontal" id="form" onsubmit="return false;">
		<input type="hidden" name="id" value="<?=$item['id']?>">
		<div class="form-group"><label class="col-sm-2 control-label">名称</label>
			<div class="col-sm-10"><input type="text" class="form-control" name="name_cn" value="<?=$item['name_cn']?>">
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">英文名称</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="name_en" value="<?=$item['name_en']?>" placeholder="">
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">国家</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="countries" value="<?=$item['countries']?>" placeholder="">
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">国家中文</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="countries_cn" value="<?=$item['countries_cn']?>" placeholder="">
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label"></label>
			<div class="col-sm-10"><label class="checkbox-inline"><input type="checkbox" name="boat_batch_countries" value="1">国家批量匹配更改</label>
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">描述</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="description" value="<?=$item['description']?>" placeholder="">
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">描述中文</label>
			<div class="col-sm-10">
				<textarea rows="6" class="form-control" name="desc_cn" placeholder=""><?=$item['desc_cn']?></textarea>
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">取消政策</label>
			<div class="col-sm-10">
				<textarea rows="6" class="form-control" name="policy" placeholder=""><?=$item['policy']?></textarea>
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">取消政策中文</label>
			<div class="col-sm-10">
				<textarea rows="6" class="form-control" name="policy_cn" placeholder=""><?=$item['policy_cn']?></textarea>
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label"></label>
			<div class="col-sm-10"><label class="checkbox-inline"><input type="checkbox" name="boat_batch_policy" value="1">取消政策批量匹配更改</label>
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">宽度</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="width" value="<?=$item['width']?>" placeholder=""></div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">长度</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="length" value="<?=$item['length']?>" placeholder=""></div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">材质</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="material" value="<?=$item['material']?>" placeholder="">
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">材质中文</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="material_cn" value="<?=$item['material_cn']?>" placeholder="">
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">语言</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="languages" value="<?=$item['languages']?>" placeholder="">
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">语言中文</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="languages_cn" value="<?=$item['languages_cn']?>" placeholder="">
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label"></label>
			<div class="col-sm-10"><label class="checkbox-inline"><input type="checkbox" name="boat_batch_languages" value="1">languages批量匹配更改</label>
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2"></label>
			<div class="col-sm-10">
				<button type="button" id="submit" class="btn btn-primary">保存</button>
				<button type="button" class="btn btn-default hidden">保存</button>
				<a href="javascript:history.back();" class="btn btn-default">返回</a>
			</div>
		</div>
	</form>
<?php } elseif ($type == 'trip') { ?>
	<form class="form-horizontal" id="form" onsubmit="return false;">
		<input type="hidden" name="id" value="<?=$item['id']?>">
		<div class="form-group"><label class="col-sm-2 control-label">名称</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="name_cn" value="<?=$item['name_cn']?>" placeholder="">
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">英文名称</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="name_en" value="<?=$item['name_en']?>" placeholder="">
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label"></label>
			<div class="col-sm-10"><label class="checkbox-inline"><input type="checkbox" name="trip_batch_name" value="1">批量匹配更改</label>
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">包含</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="includes" value="<?=$item['includes']?>" placeholder="">
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">不包含</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="excludes" value="<?=$item['excludes']?>" placeholder="">
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">描述</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="description" value="<?=$item['description']?>" placeholder="">
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">政策policy</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="policy" value="<?=$item['policy']?>" placeholder=""></div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">政策policy中文</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="policy_cn" value="<?=$item['policy_cn']?>" placeholder=""></div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">出发地</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="departure_location" value="<?=$item['departure_location']?>" placeholder="">
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">到达地</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="arrival_location" value="<?=$item['arrival_location']?>" placeholder="">
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2"></label>
			<div class="col-sm-10">
				<button type="button" id="submit" class="btn btn-primary">保存</button>
				<button type="button" class="btn btn-default hidden">保存</button>
				<a href="javascript:history.back();" class="btn btn-default">返回</a>
			</div>
		</div>
	</form>
<?php } elseif ($type == 'tour') { ?>
	<form class="form-horizontal" id="form" onsubmit="return false;">
		<input type="hidden" name="id" value="<?=$item['id']?>">
		<div class="form-group"><label class="col-sm-2 control-label">名称</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="name_cn" value="<?=$item['name_cn']?>" placeholder="">
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">英文名称</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="name_en" value="<?=$item['name_en']?>" placeholder="">
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label"></label>
			<div class="col-sm-10"><label class="checkbox-inline"><input type="checkbox" name="tour_batch_name" value="1">名称批量匹配更改</label>
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">中文描述</label>
			<div class="col-sm-10">
				<textarea rows="6" class="form-control" name="desc_cn" placeholder=""><?=$item['desc_cn']?></textarea>
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">描述</label>
			<div class="col-sm-10">
				<textarea rows="6" class="form-control" name="desc_en" placeholder=""><?=$item['desc_en']?></textarea>
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label"></label>
			<div class="col-sm-10">
				<label class="checkbox-inline"><input type="checkbox" name="tour_batch_desc" value="1">描述批量匹配更改</label>
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">货币符号</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="currency_symbol" value="<?=$item['currency_symbol']?>" placeholder="">
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">认证</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="sertification" value="<?=$item['sertification']?>" placeholder="">
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">英文包含</label>
			<div class="col-sm-10">
				<textarea rows="10" class="form-control" name="included" placeholder=""><?=$item['included']?></textarea>
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">中文包含</label>
			<div class="col-sm-10">
				<textarea rows="10" class="form-control" name="included_cn" placeholder=""><?=$item['included_cn']?></textarea>
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label"></label>
			<div class="col-sm-10">
				<label class="checkbox-inline"><input type="checkbox" name="tour_batch_included" value="1">包含 批量匹配更改</label>
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">英文不包含</label>
			<div class="col-sm-10">
				<textarea rows="10" class="form-control" name="notincluded" placeholder=""><?=$item['notincluded']?></textarea>
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">中文不包含</label>
			<div class="col-sm-10">
				<textarea rows="10" class="form-control" name="notincluded_cn" placeholder=""><?=$item['notincluded_cn']?></textarea>
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label"></label>
			<div class="col-sm-10">
				<label class="checkbox-inline"><input type="checkbox" name="tour_batch_notincluded" value="1">不包含 批量匹配更改</label>
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">Check In</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="check_in" value="<?=$item['check_in']?>" placeholder="">
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">Check Out</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="check_out" value="<?=$item['check_out']?>" placeholder="">
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">出发地点(机场)</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="departure_location" value="<?=$item['departure_location']?>" placeholder="">
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">中文出发地点(机场)</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="departure_cn" value="<?=$item['departure_cn']?>" placeholder="">
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label"></label>
			<div class="col-sm-10">
				<label class="checkbox-inline"><input type="checkbox" name="tour_batch_departure" value="1">出发地点批量匹配更改</label>
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">到达地点(机场)</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="arrival_location" value="<?=$item['arrival_location']?>" placeholder="">
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">中文到达地点(机场)</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="arrival_cn" value="<?=$item['arrival_cn']?>" placeholder="">
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label"></label>
			<div class="col-sm-10">
				<label class="checkbox-inline"><input type="checkbox" name="tour_batch_arrival" value="1">到达地点批量匹配更改</label>
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">到达港口</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="arrival_port" value="<?=$item['arrival_port']?>" placeholder="">
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">出发港口</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="departure_port" value="<?=$item['departure_port']?>" placeholder="">
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">线路</label>
			<div class="col-sm-10">
				<textarea rows="10" class="form-control" name="programm" placeholder=""><?=$item['programm']?></textarea>
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2"></label>
			<div class="col-sm-10">
				<button type="button" id="submit" class="btn btn-primary">保存</button>
				<button type="button" class="btn btn-default hidden">保存</button>
				<a href="javascript:history.back();" class="btn btn-default">返回</a>
			</div>
		</div>
	</form>
<?php } elseif ($type == 'cabin') { ?>
	<form class="form-horizontal" id="form" onsubmit="return false;">
		<input type="hidden" name="id" value="<?=$item['id']?>">
		<div class="form-group"><label class="col-sm-2 control-label">名称</label>
			<div class="col-sm-10"><input type="text" class="form-control" name="name_cn" value="<?=$item['name_cn']?>" placeholder=""></div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">英文名称</label>
			<div class="col-sm-10"><input type="text" class="form-control" name="name_en" value="<?=$item['name_en']?>" placeholder=""></div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label"></label>
			<div class="col-sm-10"><label class="checkbox-inline"><input type="checkbox" name="cabin_batch_name" value="1">批量匹配更改</label>
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">描述</label>
			<div class="col-sm-10"><textarea class="form-control" name="desc_cn" placeholder=""><?=$item['desc_cn']?></textarea></div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">英文描述</label>
			<div class="col-sm-10"><textarea class="form-control" name="desc" placeholder=""><?=$item['desc']?></textarea></div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">甲板</label>
			<div class="col-sm-10"><input type="text" class="form-control" name="deck" value="<?=$item['deck']?>" placeholder=""></div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">甲板</label>
			<div class="col-sm-10"><input type="text" class="form-control" name="deck_cn" value="<?=$item['deck_cn']?>" placeholder=""></div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label"></label>
			<div class="col-sm-10"><label class="checkbox-inline"><input type="checkbox" name="cabin_batch_deck" value="1">批量匹配更改</label>
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">床型</label>
			<div class="col-sm-10"><input type="text" class="form-control" name="bedding" value="<?=$item['bedding']?>" placeholder=""></div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">床型</label>
			<div class="col-sm-10"><input type="text" class="form-control" name="bedding_cn" value="<?=$item['bedding_cn']?>" placeholder=""></div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label"></label>
			<div class="col-sm-10"><label class="checkbox-inline"><input type="checkbox" name="cabin_batch_bedding" value="1">批量匹配更改</label>
			</div>
		</div>
		<div class="form-group"><label class="col-sm-2"></label>
			<div class="col-sm-10">
				<button type="button" id="submit" class="btn btn-primary">保存</button>
				<button type="button" class="btn btn-default hidden">保存</button>
				<a href="javascript:history.back();" class="btn btn-default">返回</a>
			</div>
		</div>
	</form>
<?php } elseif ($type == 'occupancy') { ?>

	<form class="form-horizontal" id="form" onsubmit="return false;">
		<input type="hidden" name="id" value="<?=$item['id']?>">
		<div class="form-group"><label class="col-sm-2 control-label">名称</label>
			<div class="col-sm-10"><input type="text" class="form-control" name="name_cn" value="<?=$item['name_cn']?>" placeholder=""></div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">英文名称</label>
			<div class="col-sm-10"><input type="text" class="form-control" name="name_en" value="<?=$item['name_en']?>" placeholder=""></div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">描述</label>
			<div class="col-sm-10"><textarea class="form-control" name="desc_cn" placeholder=""><?=$item['desc_cn']?></textarea></div>
		</div>
		<div class="form-group"><label class="col-sm-2 control-label">英文描述</label>
			<div class="col-sm-10"><textarea class="form-control" name="desc_en" placeholder=""><?=$item['desc_en']?></textarea></div>
		</div>
		<div class="form-group"><label class="col-sm-2"></label>
			<div class="col-sm-10">
				<button type="button" id="submit" class="btn btn-primary">保存</button>
				<button type="button" class="btn btn-default hidden">保存</button>
				<a href="javascript:history.back();" class="btn btn-default">返回</a>
			</div>
		</div>
	</form>
<?php } ?>

<script>

</script>
